import { singleton } from "tsyringe";
import { RobotAppPage } from "../../page";

@singleton()
export class IMChatActivity extends RobotAppPage {
    title: string = `聊天`
    isRuning: boolean = false;
    dispose(): void {
        this.out()
    }
    is(packageName: string): boolean {
        return `com.smile.gifmaker` === packageName|| `com.kuaishou.nebula` === packageName;
    }
    accept(activityName: string): boolean {
        return `com.yxcorp.gifshow.message.imchat.acivity.IMChatActivity` === activityName;
    }
    in(): boolean {
        if (this.isRuning) return false;
        this.isRuning = true;
        log(`IMChatActivity in`)
        return true;
    }
    out(): boolean {
        if(!this.isRuning) return false;
        this.isRuning = false;
        log(`IMChatActivity out`)
        return true;
    }
}
